// 引入当前目录的所有js文件
const ModulesFile = import.meta.glob('./*.js',{ eager: true });

const RouterList = [];

Object.values(ModulesFile).map(mod => {
    if(mod.default)
    {
        RouterList.push(...mod.default);
    }
})

const layout = {
    template:`<router-view></router-view>`
}

export default [
    {
        path:'/home',
        component:layout,
        children:RouterList
    }
]